const BASE_PROTOCOLS = [
    'host',
    'xhost',
    'rule',
    'weinre',
    'log',
    'proxy',
    'xproxy',
    'http-proxy',
    'xhttp-proxy',
    'socks',
    'xsocks',
    'pac',
    'filter',
    'ignore',
    'enable',
    'disable',
    'delete',
    'plugin',
    'dispatch',
    'urlParams',
    'urlReplace',
    'method',
    'statusCode',
    'replaceStatus',
    'hostname',
    'referer',
    'accept',
    'auth',
    'etag',
    'ua',
    'cache',
    'redirect',
    'location',
    'attachment',
    'forwardedFor',
    'responseFor',
    'reqMerge',
    'resMerge',
    'reqScript',
    'resScript',
    'reqDelay',
    'resDelay',
    'reqSpeed',
    'resSpeed',
    'reqHeaders',
    'resHeaders',
    'reqType',
    'resType',
    'reqCharset',
    'resCharset',
    'reqCookies',
    'resCookies',
    'reqCors',
    'resCors',
    'reqPrepend',
    'resPrepend',
    'reqBody',
    'resBody',
    'reqAppend',
    'resAppend',
    'reqReplace',
    'resReplace',
    'htmlPrepend',
    'cssPrepend',
    'jsPrepend',
    'htmlBody',
    'cssBody',
    'jsBody',
    'htmlAppend',
    'cssAppend',
    'jsAppend',
    'req',
    'res',
    'reqWrite',
    'resWrite',
    'reqWriteRaw',
    'resWriteRaw',
    'vase',
    'scriptfile',
];

const innerRules = ['file', 'xfile', 'tpl', 'xtpl', 'rawfile', 'xrawfile'];
const webProtocols = ['http', 'https', 'ws', 'wss', 'tunnel'];
const allInnerRules = BASE_PROTOCOLS.slice(0, 2)
    .concat(webProtocols)
    .concat(innerRules)
    .concat(BASE_PROTOCOLS.slice(3));
allInnerRules.splice(allInnerRules.indexOf('plugin'), 1);
const allRules = allInnerRules.map(function(name) {
    return name + '://';
});

export const PROTOCOLS = allRules;
